<?php

namespace App\models\user;

use Illuminate\Database\Eloquent\Model;

/**
 * App\models\user\Roles
 *
 * @property int $id
 * @property string $name
 * @property string $display_name
 * @property string $description
 * @property int $flag
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereDisplayName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereDescription($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereFlag($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereUpdatedAt($value)
 * @mixin \Eloquent
 * @property bool $level 1-100
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereLevel($value)
 * @property bool $has_del
 * @method static \Illuminate\Database\Query\Builder|\App\models\user\Roles whereHasDel($value)
 */
class Roles extends Model
{
    protected $userRoleId = 3;

    public function changUserRole($lod){
        UserRoles::where('role_id', $lod)->update(['role_id' => $this->userRoleId]);
    }
}
